<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/common/init.jsp"%>
<link href="<c:url value='/admin/css/custom.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/admin/css/style.css'/>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value='/resources/js/jquery-1.7.2.min.js'/>"></script>
<style type="text/css">
<!--
body {
	background: #ffffff;
	margin-top:10px;
	margin-left:5px;
	margin-right:5px;
}
-->
</style>
<script type="text/javascript">

</script>
<body>
<div class="EpmsInall">
<div class="EpmsSubTitle"><p><b>激活豆申请</b></p></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="EpmsTable">
  <tr>
	  <td class=EpmsTdTitle style="width:5%">申请人</td>
	  <td class=EpmsTdTitle>申请金额</td>
	  <td class=EpmsTdTitle>申请时间</td>
	  <td class=EpmsTdTitle>应汇款金额</td>
	  <td class=EpmsTdTitle>应发放激活豆</td>
	  <td class=EpmsTdTitle>是否汇款</td>
	  <td class=EpmsTdTitle>汇款时间</td>
	  <td class=EpmsTdTitle>汇款金额</td>
	  <td class=EpmsTdTitle>汇款银行</td>
	  <td class=EpmsTdTitle>汇款账号</td>
	  <td class=EpmsTdTitle>汇款人</td>
	  <td class=EpmsTdTitle>状态</td>
	  <td class=EpmsTdTitle>操作</td>
  </tr>
	<c:forEach var="activity" items="${page.result }">
		<tr>
		    <td class=EpmsTdNoColor>${activity.applyId }</td>
		    <td class=EpmsTdNoColor>${activity.applyAmount }</td>
			<td class=EpmsTdNoColor>
				<fmt:formatDate value="${activity.applyDate}" pattern="yyyy-M-dd HH:mm:ss"/>
			</td>
			<td class=EpmsTdNoColor>${activity.cash }&nbsp;</td>
		    <td class=EpmsTdNoColor>${activity.actAmount }&nbsp;</td>
		    <td class=EpmsTdNoColor>
				<c:if test="${activity.status eq '0'}">否</c:if>
				<c:if test="${activity.status eq '1' || activity.status eq '2'}">是</c:if> 
			</td>
			<td class=EpmsTdNoColor>
				<fmt:formatDate value="${activity.remitDate}" pattern="yyyy-M-dd HH:mm:ss"/>&nbsp;
			</td>
			<td class=EpmsTdNoColor>${activity.remitCash }&nbsp;</td>
		    <td class=EpmsTdNoColor>${activity.remitBank }&nbsp;</td>
			<td class=EpmsTdNoColor>${activity.remitCard }&nbsp;</td>
			<td class=EpmsTdNoColor>${activity.remitPerson }&nbsp;</td>
		    <td class=EpmsTdNoColor>
		    	<c:if test="${activity.status eq '0'}">待汇款</c:if>
				<c:if test="${activity.status eq '1'}">待审核</c:if> 
				<c:if test="${activity.status eq '2'}">申请成功</c:if>&nbsp;
		    </td>
			<td class=EpmsTdNoColor>
				<%-- <c:if test="${activity.status eq '0'}"><a>提醒汇款</a></c:if> --%>
				<c:if test="${activity.status eq '1'}"><a href="${ctx}/admin/checkapply.action?id=${activity.id}">确认汇款</a></c:if> 
				<c:if test="${activity.status eq '2'}">---</c:if>&nbsp;
			</td>
		</tr>
	</c:forEach>
	<tr>
		<td colspan="13" align="right">第${page.pageNo}页&nbsp;&nbsp;
		<c:choose>
			<c:when test="${page.pageNo >1}">
				<!-- <a>
					<span onclick="frontpage(1)">首页</span>&nbsp;
				</a> -->
				<a href="javascript:void(0);" style="text-decoration: none;">
					<span onclick="frontpage(${page.pageNo-1})">上一页</span>&nbsp;
				</a>
			</c:when>
			<c:otherwise>
				<!-- <a><span onclick="frontpage(1)">首页</span></a>&nbsp; -->
				上一页 &nbsp;
			</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${page.totalPageCount > page.pageNo}">	
					<a href="javascript:void(0);" style="text-decoration: none;">
						<span onclick="nextpage(${page.pageNo+1})">下一页</span> &nbsp;
					</a>
					<%-- <a>
						<span onclick="nextpage(${page.totalPageCount})">末页</span> &nbsp;
					</a> --%>
				</c:when>
				<c:otherwise>
					<%-- <a><span onclick="nextpage(${page.totalPageCount})">末页</span></a> &nbsp; --%>
					下一页&nbsp;
				</c:otherwise>
			</c:choose>
			&nbsp;共${page.totalPageCount }页
		</td>
	</tr>
</table>
</div>
</body>
<script type="text/javascript">
function frontpage(pageNo){
	location = "${ctx}/admin/applyList.action?pageNo="+pageNo;
}

function nextpage(pageNo){
	location = "${ctx}/admin/applyList.action?pageNo="+pageNo;
}

	
</script>